﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CAPTS_Suite
{
    internal class Setting
    {
		//public static int MACHINE_VERSION = MainWindow.MACHINE_VERSION;
        //public static int MACHINE_VERSION = 7810;
        public static int CAPTS_VERSION = 2;
		public static int TIMESHIFT = 0;

		// general setting
		public static int CHAMBER_NUM = 10; // total chamber number
		public static double CHAMBER_VOLUMN = 1.2; // 1.2 m3
		public static double CHAMBER_GROUND_AREA = 1; // 1 m3
		public static double PUMP_FLOW_RATE = 0.8;  // 0.8 L/min
											 // default air pressure
		public static double AIR_PRESSURE_DEFAULT = 101; // kPa
		public static double TEMPERATURE_DEFAULT = 30; // oC

		//CAPTS controller machine setting
		public static int LOG_DURATION_CUTOFF = 45 - 1; // log time per measurement


		// for linear fit CO2 and time
		public static int PRE_DELETE_TIME = 15; // unit: second, delete the points from the begining. For XS-134 tiangen's data. use 15s. 
		public static int LINEAR_FIT_DURATION = 29; // = LOG_DURATION_CUTOFF - PRE_DELETE_TIME; //unit: second, the time for linear fit. 

        // for linear fit CH4 and time
      //  public static int CH4_PRE_DELETE_TIME = 15; // unit: second, delete the points from the begining. For XS-134 tiangen's data. use 15s. 
      // public static int CH4_LINEAR_FIT_DURATION = 29; // = LOG_DURATION_CUTOFF - PRE_DELETE_TIME; //unit: second, the time for linear fit. 

        // for data quality control, cutoffs
        public static double R2_CUTOFF_CO2FIT = 0.5;
        public static double R2_CUTOFF_CH4FIT = 0.5;

        public static double CV_CUTOFF_PPFD = 100; // coefficient of variation, 2017-3-5

        //selection of using temperature and pressure data for Ac calculation
        public static int temperatureType = 1; // 1: CAPTS_INPUT, 0: use default
		public static int pressureType = 1; // 1: CAPTS_INPUT, 0: use default

		public static bool ProgressBarCanceled = false; //默认是false，当true时，取消正在执行的函数
	}
}
